package com.kate.mall.order.state;


import com.kate.mall.order.dto.OrderDTO;

/**
 * @Description: 用一句话描述
 * @Auther: 新梦想*陈超
 * @Date: 2021/10/30 09:48
 */
public interface OrderState {
    /**
     * 订单流转到当前这个状态
     * @param order 订单
     * @throws Exception
     */
    void doTransition(OrderDTO order) throws Exception;

    /**
     *  判断订单是否支持取消订单操作
     * @param order
     * @throws Exception
     */
    Boolean canCancel(OrderDTO order) throws Exception;

    /**
     * 判断订单是否支持支付操作
     * @param order
     * @throws Exception
     */
    Boolean canPay(OrderDTO order) throws Exception;

    /**
     * 判断订单是否支持手动确认收获操作
     * @param order
     * @throws Exception
     */
    Boolean canConfirmReceipt(OrderDTO order) throws Exception;
    /**
     * 判断订单是否支持申请退货
     * @param order
     * @throws Exception
     */
    Boolean canApplyReturnGoods(OrderDTO order) throws Exception;




}
